home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / New System Software Extensions / QuickDraw™ GX 1.1.2 / Programming Stuff / Sample Code / Graphics Samples / Spectacle ƒ / Main.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-10  |  1.6 KB  |  76 lines  |  [TEXT/KAHL]

  1. /*
  2.  *    Main.h
  3.  *
  4.  *    Robert Dierkes,  November 11, 1993
  5.  */
  6.  
  7. #define        kGraphicsHeapSize    (400 * 1024L)
  8. #define        kCycleLength        (60*60)            /* Ticks */
  9.  
  10. /*----------------------*/
  11. /*    Menus & Windows        */
  12. /*----------------------*/
  13. enum
  14. {
  15.     menuBarRsrcID    = 128,
  16.     windowRsrcID    = 128,
  17.     appleMenuRsrcID    = 128,
  18.     fileMenuRsrcID,
  19.     animationMenuRsrcID,
  20.     objectMenuRsrcID,
  21.     windowMenuRsrcID,
  22.  
  23.     aboutRsrcID        = 128
  24. };
  25.  
  26. enum
  27. {
  28.     itemAbout        = 1,    /*    appleMenuRsrcID        */
  29.  
  30.     itemQuit        = 1,    /*    fileMenuRsrcID        */
  31.  
  32.     itemBegin        = 1,    /*    animationMenuRsrcID    */
  33.     itemEnd,
  34.     itemStep,
  35.  
  36.     itemSquare        = 1,    /*    objectMenuRsrcID    */
  37.     itemOval,
  38.     itemDash1,
  39.     itemDither,
  40.     itemHalftone,
  41.  
  42.     itemShowFrame    = 1,    /*    windowMenuRsrcID    */
  43.     itemDash2,
  44.     itemMinimumPanes,
  45.     itemDash3 = itemMinimumPanes + kMaximumPanesPerSide,
  46.     itemCycle
  47. };
  48.  
  49.  
  50. /*----------*/
  51. /*    Macros    */
  52. /*----------*/
  53. #define    GetWindowKind(pWindow)            ((WindowPeek)pWindow)->windowKind
  54. #define    SetWindowKind(pWindow,rsrcID)    ((WindowPeek)pWindow)->windowKind=rsrcID
  55.  
  56.  
  57. #define        kHiliteAllMenus        (short) 0
  58. #define        kWindowOnTop        ((WindowPtr) -1)
  59. #define        kWindowTitleHeight    (short) 20
  60.  
  61.  
  62. Boolean    InitApp (void);
  63. void ExitApp (void);
  64. void InitializeMenus (void);
  65. WindowPtr InitializeWindow (void);
  66. void DoContentClick (EventRecord *pEvent, WindowPtr theWindow);
  67. void DoMenuCommand (long menuResult);
  68. void DoGrowBox (EventRecord *pEvent, WindowPtr theWindow);
  69. void DoZoomBox (EventRecord *pEvent, WindowPtr theWindow, short windowPart);
  70. void DoNullEvent (EventRecord *pEvent);
  71. void DoMouseDown (EventRecord *pEvent);
  72. void DoKeyStroke (EventRecord *pEvent);
  73. void DoUpdate (EventRecord *pEvent);
  74. void DoActivate (EventRecord *pEvent);
  75. void DoEvent (void);
  76.